<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>teamLeave</title>
  <#include "/include/layui-top.html">
  <style>
  /* 以下代码解决layer中select引发的滚动条问题，有需要时打开注释 */
  .layui-layer-page .layui-layer-content { overflow: visible !important; }
  </style>
</head>
<body style='overflow: scroll;overflow:hidden'>
<form class="layui-form layui-card-body" action="javascript:void(0);">
  <div class="layui-form-item">
  	<div class="layui-inline">
  	  <input class="layui-input" type="text" id="userName" name="userName" autocomplete="off" placeholder="请假人" />
    </div>
  	<div class="layui-inline">
	  <select name="leaveType" lay-verify="">
		<option value=""></option>
		<#list teamLeaveLeaveTypeEnum as item>
		<option value="${item.code}">${item.message}</option>
		</#list>
	  </select>      
	</div>
    <div class="layui-inline">
    	<div class="layui-btn-group">
    		<button class="layui-btn" lay-submit lay-filter="search-opt">查询</button>
    	</div>
    </div>
  </div>
  <table id="table" lay-size="sm" class="layui-hide" lay-filter="table"></table>
</form>
<#include "/include/layui-end.html">
<script type="text/html" id="toolbar">
  <div class="layui-btn-group">
	<@shiro.hasPermission name="teamLeave_add_opt">
    <button class="layui-btn layui-btn-sm" lay-event="addData-opt">
	  <i class="layui-icon">&#xe654;</i> 新增
	</button>
	</@shiro.hasPermission>
	<@shiro.hasPermission name="teamLeave_delete_opt">
	<button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batch-del-opt">
	  <i class="layui-icon">&#xe640;</i> 批量删除
	</button>
	</@shiro.hasPermission>
  </div>
  <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="refresh-opt">
	<i class="layui-icon">&#xe669;</i> 刷新
  </button>
</script>
<script type="text/html" id="optbar">
  <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="view-opt">查看</a>
  <@shiro.hasPermission name="teamLeave_edit_opt">
  <a class="layui-btn layui-btn-xs" lay-event="edit-opt">编辑</a>
  </@shiro.hasPermission>
  <@shiro.hasPermission name="teamLeave_delete_opt">
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del-opt">删除</a>
  </@shiro.hasPermission>
</script>
<script>
	layui.config({
		base: '/components/app/boss/teamLeave/'
	}).use(['table','laydate','layer','form','teamLeavePage'],function(){
		var teamLeavePage = layui.teamLeavePage;
		teamLeavePage.render();
	});
</script>
</body>
<!-- windows弹窗定义开始 -->
<div id="windows" style="display: none;">
	<form class="layui-form layui-fluid" id="win-form" lay-filter="win-form" action="javascript:;">
	<input type="hidden" id="id-win" name="id" />
	    <div class="layui-form-item">
	       <div class="layui-inline">
	            <label class="layui-form-label">请假人</label>
	            <div class="layui-input-inline">
	                <select id="userName-win" name="userName" lay-verify lay-search>
						<option value="选择请假人"></option>
						<#list users as item>
						<option value="${item.nick}">${item.nick}</option>
						</#list>
					</select>
	            </div>
	        </div>
	        <div class="layui-inline">
	            <label class="layui-form-label">类别</label>
	            <div class="layui-input-inline">
				  <select name="leaveType" lay-verify="">
					<option value=""></option>
					<#list teamLeaveLeaveTypeEnum as item>
					<option value="${item.code}">${item.message}</option>
					</#list>
				  </select>      
	            </div>
	        </div>
	    </div>
	    <div class="layui-form-item">
	    	<div class="layui-inline">
	            <label class="layui-form-label">开始时间</label>
	            <div class="layui-input-inline">
	                <input class="layui-input" type="text" id="startTime-win" name="startTime" placeholder="开始时间" readonly  autocomplete="off" />
	            </div>
	        </div>
	        <div class="layui-inline">
	            <label class="layui-form-label">截止时间</label>
	            <div class="layui-input-inline">
	                <input class="layui-input" type="text" id="endTime-win" name="endTime" placeholder="截止时间" readonly  autocomplete="off" />
	            </div>
	        </div>
	    </div>
	    <div class="layui-form-item">
		    <label class="layui-form-label">事由</label>
	        <div class="layui-input-block">
	            <textarea class="layui-textarea" id="reason-win" name="reason" autocomplete="off"></textarea>
	        </div>
	    </div>
		<input id="win-submit" lay-submit lay-filter="win-submit" hidden="true"/>
	</form>
</div>
<!-- windows弹窗定义结束 -->
</html>